Environment Variables

Back to Languages/Ruby

Some apps store config information in environment variables.

Environment Variables != Shell Variables

# set a local variable
$ MARCO='polo'
$ ruby -e "puts ENV['MARCO']"

# export converts local var to environment var
$ export MARCO
$ ruby -e "puts ENV['MARCO']"
polo

source